var datashux=
    [
        {"name":"办公楼",
         "建筑名称":"惠和楼",
        "所属部门":"测绘所",
        "负责人":"××",
        "员工人数":"30人",
         "人员构成":"博士2名、硕士7名、高级工程师3名、中级工程师19名。",
        "业务内容":"三维模型构建，传统测绘，驾驶无人机等。",
         "部门简介":"测绘所于2000成立，参与露天矿项目30余项，曾5次获得公司优秀部门，获得过省级优秀团队1次，培养了大量优秀人才。",
            "lat":"45.9459819","lon":"119.1145691","pri":"15000","url":"images/位置.png","type":"建筑",
            "id":"10000"
        },
        {   "name":"住宿楼",
            "建筑名称":"博文楼",
            "所属部门":"建筑所",
            "负责人":"××",
            "员工人数":"50人",
            "人员构成":"博士3名、硕士7名、高级工程师3名、中级工程师19名、初级工程师若干。",
            "业务内容":"民用住宅及商业网点建筑设计、钢结构设计、给排水设计、暖通设计、电力设计。工程造价等。",
            "部门简介":"建筑于2000成立，一直以来设计风格新颖，饱受业主好评，曾获得国家级建筑设计大赛一等奖，实力雄厚。",
            "lat":"45.9632302","lon":"119.1347583","pri":"13000","url":"images/位置.png","type":"建筑",
            "id":"20000"
        },
        {   "name":"穿孔机",
            "设备名称":"穿孔机",
            "装夹电极直径（mm）":"Φ0.3-Φ3",
            "主轴头行程（mm）":"200",
            "主轴伺候行程（mm）":"250",
            "主轴最大调节速度（mm/min）":"120",
            "旋转头（C轴）转速（rpm）":"45",
            "工作台尺寸":"320*440",
            "X-Y行程（mm）":"200*300",
            "导向器与工作台最大距离（mm）":"330",
            "输出最大功率（KW）":"35",
            "整机重量（kg）":"65000",
            "lat":"45.93999661382169","lon":"119.13901767908514","pri":"13000","url":"images/穿孔机.png","type":"设备",
            "id":"30000"
        },
        {   "name":"脱水机械",
            "设备名称":"脱水机",
            "过滤面积（㎡）":"40",
            "筒体尺寸：":"直径：3350 长宽：4015",
            "筒体转速rpm":"0~0.5",
            "搅拌次数(次/分)：":"25",
            "筒体转动电机功率(kw) ":"3",
            "搅拌转动电机功率(kw)":"3",
            "外形尺寸mm":"长×宽×高 6224×5606×3755",
            "重量kg":"20290",
            "lat":"45.92719269223041","lon":"119.12912342419037","pri":"13000","url":"images/脱水机械.png","type":"设备",
            "id":"40000"

        }
    ]


function Sxcx_flyto1(e){
    CloseEntities1();
    $("#shuxinglww").empty();
    var name=e
    //var name=$(e).attr("name");
    var jsondata = eval(datashux);
    var $table = $('<table id="tablelww" style="width: 400px;margin: 104px 51px;position: absolute;border: 1.5px solid #40F5FB;left: 118%;\n	font-size: 16px;\n	color: #fff;\n	background-color: rgba(13, 38, 68, 0.5);"></table>');

    jsondata.forEach((item, index) => {
        console.log(item,index)
        if (item.name == name) {
            var lon= item.lon-0.0003;
            var lat= item.lat;
            var id= item.id;
            var url= item.url;
            viewer.camera.flyTo({
                destination: Cesium.Cartesian3.fromDegrees(lon, lat-0.0004, 990),
                orientation: {
                    heading:Cesium.Math.toRadians(0),
                    pitch:Cesium.Math.toRadians(-60),
                    roll:0,
                }
            });
            idstr[0]=id;
            AddIcon(lat,lon,id,url)
            var keys = Object.keys(item);

            for (var i = 1; i < keys.length-6; i++) {
                var key = keys[i];
                var $dataRow1 = $('<tr ></tr>');
                $dataRow1.append($(`<th style="padding: 10px;
	text-align: left;
	border: 1px solid #fff;">${key}</th><td style="padding: 10px;
	text-align: left;
	border: 1px solid #fff;">${item[key]}</td>`));
                // $dataRow1.append($(`<td>${item[key]}</td>`));
                $table.append($dataRow1);
                console.log(key + ": " + item[key]);
            }


            // for (var i=1;i++;i<=item.length-6){
            //     rowdata1=item[i].key;
            //     rowdata2=item[i].value;
            //     $dataRow1.append($(`<td>${rowdata1}</td>`));
            //     $dataRow2.append($(`<td>${rowdata2}</td>`));
            // }
            $("#sxxx").show();
            $("#sxxxsc").click(function (){
                $("#sxxx").hide();
            })
        }else{
            console.log("s")
        }
    })



    $('#shuxinglww').append($table);
}